 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.viettel.core.dao.cms.AssignQuestionDAO;
import com.viettel.core.entities.cms.AssignQuestion;
import com.viettel.core.entities.vo.AssignQuestionSearchFilter;
import com.viettel.core.entities.vo.AssignQuestionSearchVO;
import com.viettel.core.exceptions.BusinessException;
import com.viettel.core.exceptions.DataAccessException;
 /**
   *  Mo ta muc dich cua lop (interface)
   *  @author: TOANTM1
   *  @version:  
   *  @since: 27/02/2014 - 11:34:02
   */
 public class AssignQuestionMgrImpl implements AssignQuestionMgr{ 
	@Autowired 
	AssignQuestionDAO assignQuestionDAO; 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public AssignQuestion getAssignQuestionById(Integer id) throws BusinessException { 
		try { 
			return  assignQuestionDAO.getAssignQuestionById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public AssignQuestion createAssignQuestion(AssignQuestion assignQuestion) throws BusinessException { 
		try { 
			return assignQuestionDAO.createAssignQuestion(assignQuestion); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void updateAssignQuestion(AssignQuestion assignQuestion) throws BusinessException { 
		try { 
			assignQuestionDAO.updateAssignQuestion(assignQuestion); 
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void deleteAssignQuestion(AssignQuestion assignQuestion) throws BusinessException { 
		try { 
			assignQuestionDAO.deleteAssignQuestion(assignQuestion); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}

	@Override
	public List<AssignQuestionSearchVO> searchAssignQuestionByFilter(
			AssignQuestionSearchFilter filter) throws BusinessException {
		try { 
			return assignQuestionDAO.searchAssignQuestionByFilter(filter);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
	
	@Override
	public List<AssignQuestion> getAssignQuestionByQuestionId(Integer questionId) throws BusinessException {
		try { 
			return assignQuestionDAO.getAssignQuestionByQuestionId(questionId);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}

	@Override
	public List<AssignQuestion> getAssignQuestionByCmsUserId(Integer cmsUserId)	throws BusinessException {
		try { 
			return assignQuestionDAO.getAssignQuestionByCmsUserId(cmsUserId);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
	
	
} 
